package com.cloudwise.pollux.common.exception;

import com.cloudwise.pollux.common.response.Response;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class CommonException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private String message;
    private String code = Response.Status.EXCEPTION.getCode();

    public CommonException(String message){
        super(message);
        this.message = message;
    }

    public CommonException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    public CommonException(String message, String code) {
        super(message);
        this.message = message;
        this.code = code;
    }

    public CommonException(String message, String code, Throwable e) {
        super(message, e);
        this.message = message;
        this.code = code;
    }

}
